using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Boom : MonoBehaviour
{
    private Animator animator;
    private SpriteRenderer spriteRenderer;

    void Awake()
    {
        this.animator = GetComponent<Animator>();
        this.spriteRenderer = GetComponent<SpriteRenderer>();
    }

    void Start()
    {
        
    }

    public void Show(bool isBlack = false)
    {
        if (isBlack)
        {
            this.spriteRenderer.sprite = Resources.Load<Sprite>("Images/BoomBlack");
            this.animator.SetBool(Defines.Black, true);
        }
        else
        {
            this.spriteRenderer.sprite = Resources.Load<Sprite>("Images/BoomWhite");
            this.animator.SetBool(Defines.Black, false);
        }
        
        Destroy(gameObject, 1.0f);
    }
}
